﻿using System.Windows;
using System.Windows.Input;

namespace DSPL.Finac.View
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void Window_KeyDown_1(object sender, KeyEventArgs e)
        {
            var parentWindow = Window.GetWindow(this);
            if (parentWindow != null)
            {
                var Uie = (UIElement)Keyboard.FocusedElement;
                if (Uie != null)
                {
                    if (e.Key == Key.Enter)
                        Uie.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
                }
            } 
        }
    }
}
